package model

import (
	"database/sql"
	"time"
)

type HrLeave struct {
	ResCommon
	MessageMainAttachmentId sql.NullInt64
	UserId                  int64
	User                    ResUsers
	ManagerId               sql.NullInt64
	HolidayStatusId         int64
	HolidayStatus           HrLeaveType
	HolidayAllocationId     sql.NullInt64
	EmployeeId              sql.NullInt64
	EmployeeCompanyId       sql.NullInt64
	DepartmentId            sql.NullInt64
	MeetingId               sql.NullInt64
	ParentId                sql.NullInt64
	CategoryId              sql.NullInt64
	ModeCompanyId           sql.NullInt64
	FirstApproverId         sql.NullInt64
	SecondApproverId        sql.NullInt64
	PrivateName             sql.NullString
	State                   string
	DurationDisplay         string
	HolidayType             string
	RequestHourFrom         sql.NullString
	RequestHourTo           sql.NullString
	RequestDateFromPeriod   string
	RequestDateFrom         time.Time
	RequestDateTo           time.Time
	ReportNote              string
	Notes                   sql.NullString
	Active                  bool
	MultiEmployee           sql.NullBool
	RequestUnitHalf         bool
	RequestUnitHours        bool
	DateFrom                time.Time
	DateTo                  time.Time
	NumberOfDays            float64
	OvertimeId              sql.NullInt64
	//PayslipState            string
}

type HrLeaveAccrualPlan struct {
	ResCommon
	TimeOffTypeId  int64
	Name           string
	TransitionMode string
}

type HrLeaveAccrualLevel struct {
	ResCommon
	Sequence                 int64
	AccrualPlanId            int64
	StartCount               int64
	FirstDay                 int64
	SecondDay                int64
	FirstMonthDay            int64
	SecondMonthDay           int64
	YearlyDay                int64
	ParentId                 int64
	PostponeMaxDays          int64
	StartType                string
	AddedValueType           string
	Frequency                string
	WeekDay                  string
	FirstMonth               string
	SecondMonth              string
	YearlyMonth              string
	ActionWithUnusedAccruals string
	IsBasedOnWorkedTime      bool
	AddedValue               float64
	MaximumLeave             float64
}

type HrLeaveStressDay struct {
	ResCommon
	CompanyId          int64
	Color              int64
	ResourceCalendarId int64
	Name               string
	StartDate          time.Time
	EndDate            time.Time
}

type HrLeaveAllocation struct {
	ResCommon
	MessageMainAttachmentId int64
	HolidayStatusId         int64
	EmployeeId              int64
	EmployeeCompanyId       int64
	ManagerId               int64
	ParentId                int64
	ApproverId              int64
	ModeCompanyId           int64
	DepartmentId            int64
	CategoryId              int64
	AccrualPlanId           int64
	PrivateName             string
	State                   string
	HolidayType             string
	AllocationType          string
	DateFrom                time.Time
	DateTo                  time.Time
	Lastcall                time.Time
	Nextcall                time.Time
	Notes                   string
	Active                  bool
	MultiEmployee           bool
	NumberOfDays            float64
	OvertimeId              int64
}

type HrLeaveType struct {
	ResCommon
	Sequence                 int64
	Color                    int64
	IconId                   int64
	CompanyId                int64
	ResponsibleId            int64
	LeaveNotifSubtypeId      int64
	AllocationNotifSubtypeId int64
	ColorName                string
	LeaveValidationType      string
	RequiresAllocation       string
	EmployeeRequests         string
	AllocationValidationType string
	TimeType                 string
	RequestUnit              string
	Name                     string
	CreateCalendarMeeting    bool
	Active                   bool
	Unpaid                   bool
	SupportDocument          bool
	OvertimeDeductible       bool
	WorkEntryTypeId          int64
	TimesheetProjectId       int64
	TimesheetTaskId          int64
	TimesheetGenerate        bool
}
